
package org.apache.ocean;

import org.apache.ocean.database.SQLNULL;

/**
 *
 * @author  jason rutherglen
 */
public interface ClusterConstants {
  // udp message actions
	public static final SQLNULL.NULLDate NULL_DATE = new SQLNULL.NULLDate();
	public static final SQLNULL.NULLTransactionID NULL_TRANSACTIONID = new SQLNULL.NULLTransactionID();
	public static final String NULL_STRING = Long.toString(-1*System.currentTimeMillis());
  public static final String KEEP_ALIVE = "keepalive";
  public static final String NAME_ANNOUNCEMENT = "nameannouncement";
  public static final String UPDATE_NODE = "updatenode";
  public static final String UPDATE_CELL = "updatecell";
  
  public static final String ONLINE = "online";
  public static final String OFFLINE = "offline";
  public static final String FATAL = "fatal";
  
  // roles
  public static final String MASTER = "master";
  public static final String SLAVE = "slave";
  public static final String CLIENT = "client";
  public static final String NAME = "name";
  public static final String NOTHING = "nothing";
  
  // port increments
  //public static final int REPLICATION_PORT_INCREMENT = 11000;
  //public static final int NAME_UDP_PORT_INCREMENT = 6509;
  
  // types
  public static final String SINGLE = "single";
  public static final String CLUSTER_NAME = "clustername";
  public static final String CLUSTER_NO_NAME = "clusternoname";
  
  public static String CONTENT_TYPE_XML = "text/xml; charset=UTF-8";
  public static String CONTENT_TYPE_HTML = "text/html; charset=UTF-8";
  
  public static final String CURRENT_TRANSACTION_ID = "currentTransactionID";
  
  public static final long NODE_LEASE_DURATION = 1000*30;
  
  public static final String READ = "read";
  public static final String READ_WRITE = "readwrite";
  public static final String OFF = "off";
  public static final String MOVING_TO = "movingto";
  public static final String MOVING_FROM = "movingfrom";
  public static final String DELETED = "deleted";
  public static final String BLANK = "blank";
  public static final String CORRUPT_INDEX = "corruptindex";
  
  public static final String DIRECTORY_DATE_FORMAT = "yyyyMMddkkmmss";
  
  //public static final String CELL_ID = "cellID";
  
  public static final String SCORE_FIELD = "__score";
  
  public static final String NAME_FIELD = "name";
  public static final String VALUE_FIELD = "value";
  public static final String TYPE_FIELD = "__type";
  public static final String CELL_ID_FIELD = "__cellid";
  public static final String SHARD_ID_FIELD = "__shardid";
  public static final String ID_FIELD = "__id";
  public static final String GUID_FIELD = "__guid";
  public static final String VERSION_FIELD = "__version";
  public static final String ID_VERSION_FIELD = "__idversion";
  public static final String DATE_MODIFIED_FIELD = "__datemodified";
  public static final String DATE_CREATED_FIELD = "__datecreated";
  public static final String DATE_EXPIRE_FIELD = "__dateexpire";
  public static final String TRANSACTION_ID_FIELD = "__transactionid";
  public static final String CELL_TRANSACTION_ID_FIELD = "__celltransactionid";
  public static final String DISTANCE_FIELD = "__distance";
  public static final String SCHEMA_VERSION_FIELD = "__schemaversion";
  public static final String LATITUDE_FIELD = "__latitude";
  public static final String LONGITUDE_FIELD = "__longitude";
  
  public static final String ID_SEQUENCE = "idsequence";
}
